<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('/admin/login',"Admin\LoginController@login");  //加载登陆页面
Route::post('/admin/doLogin',"Admin\LoginController@doLogin"); //执行登陆
Route::get('/admin/captch/{tmp}',"Admin\LoginController@captch");//验证码处理

Route::group(['prefix'=>'admin','middleware'=>'myauth'], function (){
    Route::get('/',"Admin\IndexController@index");
    Route::get('/logout',"Admin\LoginController@logout");
    Route::resource('/user',"Admin\UserzhuceController"); //会员注册
    Route::resource('/information',"Admin\ImformationController"); //会员详情信息
    Route::resource('/address',"Admin\AddressController");//会员收货地址
    Route::resource('/companyindex',"Admin\CompanyindexController");//公司首页
    Route::resource('/companynews',"Admin\CompanynewsController");//公司新闻页

});